-- GENERATED SPELL FOR [Sunscale Screecher] --


function spell0_3255(pUnit, Event) --@Claw,n/a--
pUnit:FullCastSpellOnTarget(16828,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3255', 652, 1)
end

function spell1_3255(pUnit, Event) --@Claw,n/a--
pUnit:FullCastSpellOnTarget(16829,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3255', 687, 1)
end

function spell2_3255(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(1742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3255', 0, 1)
end

function spell3_3255(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(1753,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3255', 0, 1)
end

function spell4_3255(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(14916,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3255', 0, 1)
end

function spell5_3255(pUnit, Event) --@Savage Rend,n/a--
pUnit:FullCastSpellOnTarget(50498,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3255', 15000, 1)
end

function Sorts_3255(pUnit, Event)
local choix_sorts_3255 = math.random(0, 5)
if choix_sorts_3255 == 0 then
pUnit:RegisterEvent('spell0_3255', 1, 1)
end
if choix_sorts_3255 == 1 then
pUnit:RegisterEvent('spell1_3255', 1, 1)
end
if choix_sorts_3255 == 2 then
pUnit:RegisterEvent('spell2_3255', 1, 1)
end
if choix_sorts_3255 == 3 then
pUnit:RegisterEvent('spell3_3255', 1, 1)
end
if choix_sorts_3255 == 4 then
pUnit:RegisterEvent('spell4_3255', 1, 1)
end
if choix_sorts_3255 == 5 then
pUnit:RegisterEvent('spell5_3255', 1, 1)
end
end

function mob3255_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3255', math.random(1500, 3000), 1)
end

function mob3255_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3255_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3255_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3255, 1, 'mob3255_Action')
RegisterUnitEvent(3255, 2, 'mob3255_Leave')
RegisterUnitEvent(3255, 3, 'mob3255_Kill')
RegisterUnitEvent(3255, 4, 'mob3255_Die')
